import React from 'react'
import {Swiper} from 'antd-mobile'
import {imgPre} from '../../../../request/http'
import "./banner.less"

function Banner(props) {
    let {banner}=props;
    return (
        <div className="banner">
            <Swiper style={{"--height":"4rem"}}>
                {banner.map((item) => {
                return (
                    <Swiper.Item key={item.id}>
                    <img src={imgPre+item.img} alt="" />
                    </Swiper.Item>
                );
                })}
            </Swiper>
        </div>
    )
}
export default React.memo(Banner)